import React, { Component, Fragment } from 'react';
import router from 'umi/router';
import HeaderTab from '@/components/HeaderTab';
import Development from '@/components/DevelopmentPage';

export default class Index extends Component {
    state = {        
        tabs: [
            {
              title: '快递发货',
              key: `/${window.storeId}/delivery/express`,
              // disabled: true
            },
            {
              title: '快递单模板',
              key: `/${window.storeId}/delivery/expressbilltemplate/list`,
            },
            {
              title: '物流公司',
              key: `/${window.storeId}/delivery/logistics`,
            },
            // {
            //   title: '物流查询',
            //   key: `/${window.storeId}/delivery/logisticsInquiry`,
            // },
          ],
    }

    // 头部标签页切换
  onTabChange = id => {
    this.setState(
      {
        activeId: id,
      },
      () => {
        router.replace({
          pathname: `${id}`,
        });        
      }
    );
  };

  componentWillMount() {
    window.Isoption = false;
  }
  componentDidMount() {
    window.Isoption = true;
  }

    render() {
        const { expressList, commonExpressList ,loading,oemInfo} = this.props;
        const { tabs } = this.state;
        return (
            <Fragment>
                {/* <HeaderTab
                _this={this}
                type="slider"
                activeId={this.state.activeId}
                onChange={this.onTabChange}
                tabs={tabs}               
                > 
                </HeaderTab> */}
                <Development />                    
            </Fragment>
        );
    }
}